package com.example.network.monitor;

//import android.net.ConnectivityManager;
//import android.net.NetworkInfo;
import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.View;
//import android.widget.TextView;

public class MainActivity extends Activity {

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
    }
    //The commented out code on this page was an attempt to check for a wifi connection but i could not resolve my error. its was extraneous functionality.
    public void openWifi(View view) {
    	//Button p1_button = (Button)findViewById(R.id.wifi_net_btn);//This should change the text of the button, It works!.
    	//p1_button.setText("Some text");
    	//ConnectivityManager manager = (ConnectivityManager) getSystemService(CONNECTIVITY_SERVICE);
    	//NetworkInfo mWifi = manager.getNetworkInfo(ConnectivityManager.TYPE_WIFI);

    	//if (mWifi.isConnected()) {
    		Intent intent = new Intent(this,SecondActivity.class);
    		//start the second Activity
    		this.startActivity(intent);
    	//}else{
    	//	TextView textBox = (TextView) findViewById(R.id.textView1);
    	//	textBox.setText("Error: No wifi connection.");
    	//}
    }
}
